package easier.window;

import android.app.Dialog;
import android.content.Context;
import android.os.Bundle;
import android.view.Window;
import android.view.WindowManager.LayoutParams;
import androidx.annotation.Nullable;
import easier.window.dialog.BaseDialog;
import easier.window.dialog.BaseDialogFragment;

public class MatchParentDialogFragment extends BaseDialogFragment {

    @Override
    protected Dialog createDialog( Context context, @Nullable Bundle savedInstanceState ) {

        return new BaseDialog( context ) {
            @Override
            protected void configWindow( Window window ) {

                super.configWindow( window );
                LayoutParams attributes = window.getAttributes();
                attributes.width = LayoutParams.MATCH_PARENT;
                attributes.height = LayoutParams.MATCH_PARENT;
            }
        };
    }
}
